<% content_for :content do %>



  <h1>Ankiety</h1>

  <table>
    <tr>
      <th>Tytuł</th>
    </tr>
  <% for survey in @surveys %>
    <tr>
      <td><%=h survey.title %></td>
      <td><%= link_to 'Pokaż',{:id => survey ,:action=>"show_survey"} %></td>
      <td><%= link_to 'Usuń', {:id => survey ,:action=>"delete_survey"} , :confirm => 'Are you sure?',
                                             :method => :delete%></td>
      <td><%= link_to 'Przyznaj prawa', {:id => survey ,:action=>"new_rights"} %></td>
      
    </tr> 
  <% end %>
  </table>
        
<% end %>

